import Layout from '@/layout'

const purchaseRouter =
{
  path: '/pur',
  name: 'pur-group',
  component: Layout,
  meta: { title: '采购管理', icon: 'tree', roles: ['m5200'] },
  children: [
    {
      path: 'account',
      component: (resolve) => require(['@/views/pur-group/account-manage/index'], resolve),
      name: 'AccountManage',
      remoteParam: { serviceName: 'wms', path: '/api/sup/account-info/' },
      remoteUrl: '',
      meta: { title: '供应商账号', roles: ['m5220'] }
    },
    {
      path: 'certification-apply',
      component: (resolve) => require(['@/views/pur-group/certification-apply-manage/index'], resolve),
      name: 'CertificationApplyManage',
      remoteParam: { serviceName: 'wms', path: '/api/sup/account-certification-apply' },
      remoteUrl: '',
      meta: { title: '供应商认证', roles: ['m5260'] }
    },
    {
      path: '/certification-apply/edit/:no',
      name: 'CertificationApplyManageEdit',
      component: (resolve) => require(['@/views/pur-group/certification-apply-manage/edit'], resolve),
      meta: { title: '供应商认证-详细' },
      hidden: true
    },
    {
      path: 'supplier',
      component: (resolve) => require(['@/views/pur-group/supplier-manage/index'], resolve),
      name: 'SupplierManage',
      remoteParam: { serviceName: 'wms', path: '/api/sup/supplier-info/' },
      remoteUrl: '',
      meta: { title: '供应商信息', roles: ['m5210'] }
    },
    {
      path: '/supplier/edit/:no',
      name: 'SupplierManageEdit',
      component: (resolve) => require(['@/views/pur-group/supplier-manage/edit'], resolve),
      meta: { title: '供应商信息-详细' },
      hidden: true
    },
    {
      path: 'bank',
      component: (resolve) => require(['@/views/pur-group/bank-manage/index'], resolve),
      name: 'BankManage',
      remoteParam: { serviceName: 'wms', path: '/api/sup/bank-info/' },
      remoteUrl: '',
      meta: { title: '收款信息', roles: ['m5230'] }
    },
    {
      path: 'order/:status?',
      component: (resolve) => require(['@/views/pur-group/order-manage/index'], resolve),
      name: 'PurOrderManage',
      remoteParam: { serviceName: 'wms', path: '/api/pur/order-info/' },
      remoteUrl: '',
      meta: { title: '采购单', roles: ['m5250'] }
    },
    {
      path: '/order/edit/:no',
      name: 'PurOrderManageEdit',
      component: (resolve) => require(['@/views/pur-group/order-manage/edit'], resolve),
      meta: { title: '采购单-详细' },
      hidden: true
    },
    {
      path: 'pur-check',
      component: (resolve) => require(['@/views/pur-group/check-manage/index'], resolve),
      name: 'PurCheckManage',
      remoteParam: { serviceName: 'wms', path: '/api/pur/analyze/' },
      remoteUrl: '',
      meta: { title: '采购单审批', roles: ['m5280'] }
    },
    {
      path: 'pur-settlement',
      component: (resolve) => require(['@/views/pur-group/settlement-manage/index'], resolve),
      name: 'PurSettlementManage',
      remoteParam: { serviceName: 'wms', path: '/api/pur/analyze/' },
      remoteUrl: '',
      meta: { title: '采购单结算', roles: ['m5290'] }
    },
    {
      path: 'analyze',
      component: (resolve) => require(['@/views/pur-group/analyze-manage/index'], resolve),
      name: 'AnalyzeManage',
      remoteParam: { serviceName: 'wms', path: '/api/pur/analyze' },
      remoteUrl: '',
      meta: { title: '采购分析', roles: ['m5270'] }
    }
    // ,{
    //   path: 'return-order',
    //   component: (resolve) => require(['@/views/pur-group/return-order-manage/index'], resolve),
    //   name: 'PurReturnOrderManage',
    //   remoteParam: { serviceName: 'wms', path: '/api/pur/return-order-info/' },
    //   remoteUrl: '',
    //   meta: { title: '退货单', roles: ['m5270'] }
    // },
    // {
    //   path: '/return-order/edit/:no',
    //   name: 'PurReturnOrderManageEdit',
    //   component: (resolve) => require(['@/views/pur-group/return-order-manage/edit'], resolve),
    //   meta: { title: '退货单-详细' },
    //   hidden: true
    // }
  ]
}
export default purchaseRouter
